package so.wy.servicecenter.businessbed.service.hospital.dto;

import lombok.Data;
import lombok.NoArgsConstructor;
import so.wy.servicecenter.businessbed.dao.rdb.hospital.hospital_depart.HospitalDepartDO;

/**
* @author wdl
* @date 2020-04-08
*/
@Data
@NoArgsConstructor
public class HospitalDepartDTO{

	/** 科室ID */
	private Long departId;
	/** 医院ID */
	private Long hospitalId;
	/** 科室名称 */
	private String departName;
	/** 排序 */
	private Integer sortNum;

	public HospitalDepartDTO(HospitalDepartDO hospitalDepartDO){
		if(hospitalDepartDO==null){
			return ;
		}

		this.departId = hospitalDepartDO.getDepartId();
		this.hospitalId = hospitalDepartDO.getHospitalId();
		this.departName = hospitalDepartDO.getDepartName();
		this.sortNum = hospitalDepartDO.getSortNum();
	}

	public HospitalDepartDO convert2DO(){
		HospitalDepartDO hospitalDepartDO = new HospitalDepartDO();
		hospitalDepartDO.setDepartId(this.departId);
		hospitalDepartDO.setHospitalId(this.hospitalId);
		hospitalDepartDO.setDepartName(this.departName);
		hospitalDepartDO.setSortNum(this.sortNum);
		return hospitalDepartDO;
	}

}
